QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++11
DESTDIR += bin
MOC_DIR += ./tmp
OBJECTS_DIR += ./tmp
UI_DIR += ./tmp
RCC_DIR += ./tmp
INCLUDEPATH += ./tmp ./src $(FFMPEGDIR)/include
CONFIG += console qt warn_on debug_and_release

SOURCES +=  src/main.cpp \
            src/VideoRecording.cpp \
			src/RecordingThread.cpp

HEADERS +=  src/VideoRecording.h \
            src/RecordingThread.h

FORMS   +=  forms/VideoRecording.ui

TRANSLATIONS += VideoRecording_zh_CN.ts


win32 {
    LIBS += $(FFMPEGDIR)/lib/avdevice.lib
	LIBS += $(FFMPEGDIR)/lib/avutil.lib
	LIBS += $(FFMPEGDIR)/lib/avcodec.lib
	LIBS += $(FFMPEGDIR)/lib/avformat.lib
	LIBS += $(FFMPEGDIR)/lib/swscale.lib
	
    build_pass:CONFIG(release, debug|release) {
    }

    build_pass:CONFIG(debug, debug|release) {
		TARGET = $$join(TARGET,,,d)
    }
}


unix {
    LIBS += -L$$(FFMPEGDIR)/lib -lavdevice
    LIBS += -L$$(FFMPEGDIR)/lib -lavutil
    LIBS += -L$$(FFMPEGDIR)/lib -lavformat
}
